package service;

import dao.SysDictDao;
import entity.SysDict;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by chris on 17-5-9.
 */
@Service
public class SysDictService {

    @Autowired
    private SysDictDao sysDictDao;

    @Transactional(readOnly = true)
    public List<SysDict> lists(){
        String hql = "from SysDict where del_flag='0'";
        return sysDictDao.findList(hql);
    }
    @Transactional(readOnly = true)
    public List<SysDict> getgoodslists(){
        String hql = "from SysDict where label='goods_type'";
        return sysDictDao.findList(hql);
    }
}
